/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class Motor {
    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device || {};
        this.opts = opts || {};
        this._to = to;
    }

    get categoryCode() {
        return '010080050';
    }

    get categoryName() {
        return '\u5c0f\u8f66';
    }

    getLeftWheelRotationSpeed(params) {
        return command({
            method: 'getLeftWheelRotationSpeed',
            methodId: 'phEqck3r',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMotorRotationSpeed(params) {
        return command({
            method: 'getMotorRotationSpeed',
            methodId: 'pgh0sqDA',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getMovementDirection(params) {
        return command({
            method: 'getMovementDirection',
            methodId: 'pDrhMbeC',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getRightWheelRotationSpeed(params) {
        return command({
            method: 'getRightWheelRotationSpeed',
            methodId: 'ptRSJ1rd',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getSwitch(params) {
        return command({
            method: 'getSwitch',
            methodId: 'p1vZ5x7U',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLeftWheelRotationSpeed(params) {
        return command({
            method: 'setLeftWheelRotationSpeed',
            methodId: 'pZguAyNP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setMotorRotationSpeed(params) {
        return command({
            method: 'setMotorRotationSpeed',
            methodId: 'pUPQZjzm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setMovementDirection(params) {
        return command({
            method: 'setMovementDirection',
            methodId: 'ppAXNOK5',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setRightWheelRotationSpeed(params) {
        return command({
            method: 'setRightWheelRotationSpeed',
            methodId: 'pGoxwGOw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setSwitch(params) {
        return command({
            method: 'setSwitch',
            methodId: 'peH32fUl',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default Motor;
